import java.util.Scanner;
/*
    统计字符次数
 */
public class CountString {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入字符串");
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        int up = 0,low = 0,num = 0;

        for (int i = 0; i < c.length; i++) {
            if ((c[i] >= 'A') && (c[i] <= 'Z')){
                up++;
            }
            if ((c[i] >= 'a') && (c[i] <= 'z')){
                low++;
            }
            if ((c[i] >= '0') && (c[i] <= '9')){
                num++;
            }
        }
        System.out.println("字符串含大写字母"+up+"个,小写字母"+low+"个,数字"+num+"个");
    }
}
